package com.axjy.util;

public class PagerContext {

    private static ThreadLocal<Integer> offsetTl=new ThreadLocal<>();
    private static ThreadLocal<Integer> pageSizeTl=new ThreadLocal<>();

    public static  void setOffsetTl(Integer offset){
        offsetTl.set(offset);
    }

    public static Integer getOffsetTl(){
        Integer offset=offsetTl.get();
        return offset;
    }

    public static void setPageSizeTl(Integer pageSize){
        pageSizeTl.set(pageSize);
    }

    public static  Integer getPageSizeTl(){
       Integer pageSize= pageSizeTl.get();
       return pageSize;
    }

    public static void destroy(){
        offsetTl.remove();
        pageSizeTl.remove();
    }





}
